//
//  AFN.m
//  testApp
//
//  Created by mc309 on 2017/4/19.
//  Copyright © 2017年 ColdMountain. All rights reserved.
//

#import "AFN.h"

@implementation AFN

+ (instancetype )sharedInstance
{
    static AFN *sharedInstance = nil;
    static dispatch_once_t predicate;
    dispatch_once(&predicate, ^{
        sharedInstance = [[super alloc] init];
    });
    return sharedInstance;
}

+ (void)postResqustUrl:(NSString*)url withDic:(NSDictionary*)dic
{
    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
    manager.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/html"];
    NSDictionary *parameters = @{@"telephone":@"15929922717"};
    [manager POST:@"http://192.168.1.104:8080/api/userInfo/getIdentify.do"parameters:parameters
          success:^(AFHTTPRequestOperation *operation,id responseObject) {
              NSLog(@"Success: %@", responseObject);
          }failure:^(AFHTTPRequestOperation *operation,NSError *error) {
              NSLog(@"Error: %@", error);
          }];
}




@end
